Skip to content

fix(provider-limrun): preserve Unicode in Limrun iOS fill - #3863

Merged
thymikee merged 5 commits into
callstack:mainfrom
mvanhorn:fix/3819-limrun-ios-unicode-fill
Oct 30, 2026
Merged

thymikee merged 5 commits into
callstack:mainfrom
mvanhorn:fix/3819-limrun-ios-unicode-fill

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Limrun iOS fill writes the complete focused field value in one call so text without hardware key codes is not dropped. type still sends key events. A failed value write now returns text_entry_value_write_failed with an unknown dispatch outcome. This change touches five files, including shared command help and documentation. Fixes #3819.

Validation

  • Head 20adcdca62; base 3c6673a2b9. pnpm check:affected --run --head HEAD passed at the exact commit, including the unit suite. GitHub owns integration, coverage, and device lanes. No equivalent base run was performed.

  • Live Limrun iOS at b8b5c96b11 (identical file content after rebase), using limrun-inc/sample-native-app and a Flutter sign-in app (com.example.ad2578). Commands used an isolated Limrun session. Output and read-back:

    Command Result
    fill 'id="nameField"' Ada; fill 'id="nameField"' '你好'; press 'id="greetButton"' Both fills succeeded with textEntryReadiness: focused-element; snapshot: field 你好, greeting Hello, 你好!.
    fill 'id="nameField"' ''; press 'id="greetButton"' Filled 0 chars; snapshot: placeholder Your name, greeting Hello, world!.
    fill 'id="nameField"' Ada; type Hello Typed 5 chars; snapshot: field AdaHello.
    Flutter: fill 'label="Email" editable=true' '你好' COMMAND_FAILED, reason text_entry_value_write_failed, dispatched: unknown. Limrun did not find a globally focused element; inspect before retrying.
  • The cloud session was closed. CI for this head is pending. At ee2d49a7bf, Apple smoke failed in GitHub hashFiles after 120 seconds; provider integration timed out in Android recording. The provider gate passed on base 3c6673a2b9 locally and CI integration passed at 806016dacc; the earlier timeout cause remains unproven. Vercel requires team authorization. Independent review was unavailable; the diff was reviewed locally.

@thymikee

Copy link
Copy Markdown
Member

Fill on Limrun iOS now depends on the server-side focused setElementValue, and this PR never ran it on a device, so it is not ready to merge at 572f2ff. packages/provider-limrun/src/ios.ts:302 leaves three behaviors unproven: whether the call replaces existing text instead of inserting, whether setElementValue("") clears the field instead of being rejected (Android setText rejects empty text), and whether the focused:true lookup works in apps that report no globally focused element, such as Flutter, which the docs and test fixtures say still fill. The unit tests mock the Limrun client, so a server that appends, rejects empty text, or cannot resolve focus passes every test and still fails on device, and fill could silently drop or append text or throw on clear.

Please run fill live on a Limrun iOS instance at 572f2ff, for example against limrun-inc/sample-native-app nameField and greetButton, and cover four cases: fill '你好' over existing 'Ada' (the field should read 你好 and the heading 'Hello, 你好!'), fill '' (the field should clear), fill on a field in an app that reports no focused element (it should succeed or fail with a typed error), and type 'Hello' (it should still append through key events). Please paste the CLI output and the read-back into the PR.

Not blocking, and fine to take or leave: the Limrun iOS docs line at website/docs/docs/limrun.md:78 and the "a fill that sent its keys" comment at packages/contracts/src/interactor-types.ts:149 should say fill writes the value without key events (so key-event handlers may not run, and type is the keystroke path), the ignored delayMs (now _delayMs) in ios.ts:280 could be noted in the Limrun help and the comment trimmed to the one fact that the selector is omitted so the server resolves focus, and the three tests at ios-interactor-text-entry.test.ts:112 share one shape and could become one table-driven test over the texts, the delay, and the empty string.

CI is green with 14 checks and none failing, but those tests never reach the device path, and I could not run the live path myself.

@mvanhorn

Copy link
Copy Markdown
Contributor Author

Thanks for the review. You're right that the mocked client proves nothing about the server's setElementValue, so I'm treating the live run as the merge blocker.

Status at 572f2ff: not verified on a Limrun instance yet. I don't have Limrun credentials right now, and agent-device connect limrun --platform ios from this build stops with INVALID_ARGS: connect limrun requires LIMRUN_API_KEY, or LIM_IOS_INSTANCE_URL, LIM_IOS_INSTANCE_TOKEN. A local simulator doesn't help, because it runs the XCTest backend and never reaches LimrunIosInteractor.fill.

What I checked locally at 572f2ff: pnpm run build passes, and vitest run packages/provider-limrun/src/ios-interactor-text-entry.test.ts passes 9 of 9. Both are mock-level results only.

Once I have an instance, I'll run these against limrun-inc/sample-native-app and post the raw CLI output and read-back here:

  1. Unicode replace: fill nameField with 'Ada', then fill nameField with '你好', tap greetButton, snapshot. Expect the field to read 你好 and the heading to read 'Hello, 你好!'.
  2. Clear: fill nameField with '', then snapshot. Expect the field to be empty.
  3. No globally focused element: fill a field in limrun-inc/sample-flutter-app. Expect it to succeed with a correct read-back, or fail with a typed error.
  4. Append: fill nameField with 'Ada', press the field, type 'Hello', then snapshot. Expect 'AdaHello'.

If you or someone at Callstack can share an iOS instance URL and token, I can run this today. I'll take the non-blocking doc, comment and table-test cleanups in the same follow-up push.

@thymikee
thymikee marked this pull request as draft October 30, 2026 10:01

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread packages/provider-limrun/src/ios.ts Resolved
@thymikee
thymikee force-pushed the fix/3819-limrun-ios-unicode-fill branch from a1fd60b to b8b5c96 Compare October 30, 2026 10:14
@vercel

vercel Bot commented Oct 30, 2026

Copy link
Copy Markdown

@thymikee is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@thymikee
thymikee marked this pull request as ready for review October 30, 2026 10:14
mvanhorn and others added 3 commits October 30, 2026 11:15
After text-entry focus arrives, fill writes the whole string with one
setElementValue call, including an empty string and characters that have
no hardware key. A supplied delay remains on the signature and the
replacement stays a single write. type still sends key events, with
per-character timing when a delay is set. The Limrun iOS docs and the
text-entry tests follow that path, including no write when focus never
arrives and failure when the value write is rejected.

Fixes callstack#3819

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread website/docs/docs/limrun.md Resolved
@thymikee
thymikee force-pushed the fix/3819-limrun-ios-unicode-fill branch from b8b5c96 to ee2d49a Compare October 30, 2026 10:23
@thymikee

Copy link
Copy Markdown
Member

I reviewed ee2d49a and found no code problems that need a change before merge. Thanks for the fix: Unicode text now goes through setElementValue, and the Flutter trade-off is disclosed in the PR body and in limrun.md.

Not blocking, and you can take or leave these: fill now needs the server to resolve a globally focused element, so apps that report none (like your Flutter row) fail every fill with text_entry_value_write_failed, which is the accepted cost of not classifying text; and the if (error instanceof AppError) throw error; branch in packages/provider-limrun/src/ios.ts:301 may be dead if the Limrun client only throws plain Errors, so you could drop it unless the client can throw AppError.

The live Limrun iOS run is the table in the PR body. I could not reproduce it without Limrun credentials. I only checked that the evidenced commit has the same provider-limrun and limrun.md content as this head. I did not re-run the unit suite or check:affected.

The Integration Tests failure is one 5000 ms timeout in the Android recording scenario (221 of 222 tests passed), and that scenario does not run the Limrun iOS fill. The Smoke Tests iOS phase also failed, but the log excerpt shows no cause, and this diff touches no Apple runner, daemon or contracts code. So both look unrelated, though I could not confirm a root cause. Please rerun both jobs. Vercel needs a Callstack member to authorize the fork deploy.

Two Cubic threads still apply, both non-blocking: #3863 (comment) (shared fill docs) and #3863 (comment) (press/type advice). Please reply to or resolve them. After that, the remaining steps before merge are green reruns and the Vercel authorization.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread website/docs/docs/commands.md Resolved
@thymikee

Copy link
Copy Markdown
Member

The code looks good at 20adcdc, and the three points from the earlier review (#3863 (comment)) are now fixed. Not blocking, and you can take or leave it: the reworded help line at src/commands/schema/cli-help.ts:107 drops the "plain fill/type first" ordering and the debounced/search-as-you-type trigger, and it puts a Limrun-only exception into help shared by every backend. You could keep the original sentence and append only the Limrun clause.

The three inline threads from the other review are fixed at this head and already resolved: the --delay-ms help and docs (#3863 (comment)), the unknown-outcome hint (#3863 (comment)), and the Text-entry error list (#3863 (comment)). No lower-priority threads still apply.

The only check that does not pass is Vercel. It fails on team authorization and never built, so it is unrelated to this change. The other 13 checks pass. I did not run pnpm check:affected or the Limrun live path. The unit result and the live table are your reported numbers at b8b5c96. I did not read the Limrun server's setElementValue, so the "no globally focused element" behaviour on Flutter rests on your live row.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 30, 2026
@thymikee
thymikee merged commit 0022611 into callstack:main Oct 30, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Limrun iOS fill reports success but drops non-ASCII text

2 participants